exports.search_help_activity_list = function(req,res) {

    //获取restful参数
    var restfulParams = req.routeInfo.restfulParams;

    //最终结果
    var resultData = {};

    //任务流创建
    async.waterfall([

        //获取助力活动参赛者列表
        function(cb){

            R.SEND_HTTP(
                req,
                {
                    url    : CORE_APIConfig.coreAPI.search_help_activity_list + "/count/1/hasu_oaid/" + restfulParams.hasu_oaid  ,
                    method : 'POST',
                    data   : {
                        fields : [
                            "hasu_id",
                            "hasu_name",
                            "hasu_integral",
                            "u_header_url",
                            "hasu_oaid",
                        ].join(",")
                    }
                },
                function (err, data) {

                    resultData.helpActivityListData = data;

                    cb();
                }
            );
        },
        //获取活动结束时间
        function(cb){

            R.SEND_HTTP(
                req,
                {
                    url    : CORE_APIConfig.coreAPI.search_help_activity_end_time + "/oa_id/" + restfulParams.hasu_oaid ,
                    method : 'POST',
                    data   : {
                        fields : [
                            "oa_end_time",
                            "oa_role",
                            "oa_reward",
                            "oa_remark",
                        ].join(",")
                    }
                },
                function (err, data) {

                    resultData.activityEndtime = data.data;

                    cb();
                }
            );
        },
        //获取该活动的助力总人数
        function(cb){

            R.SEND_HTTP(
                req,
                {
                    url    : CORE_APIConfig.coreAPI.search_help_activity_num + "/count/1/hahr_oaid/" + restfulParams.hasu_oaid ,
                    method : 'GET',
                },
                function (err, data) {

                    resultData.activityHelpNum = data.count;

                    cb();
                }
            );
        },

    ],function(err, result){

        //返回最终拼接结果
        RES.response(res,true,resultData);

    });

}


























